package com.tencent.supersonic.chat.server.parser;

import org.apache.commons.collections.CollectionUtils;

import com.tencent.supersonic.chat.server.pojo.ParseContext;
import com.tencent.supersonic.headless.api.pojo.SemanticParseInfo;
import com.tencent.supersonic.headless.api.pojo.response.ParseResp;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DDL2SQLParser implements ChatQueryParser {

	@Override
	public void parse(ParseContext parseContext, ParseResp parseResp) {
		// TODO Auto-generated method stub
		if (!parseContext.getAgent().containsDDL2SQLTool()) {
            return;
        }
        

        SemanticParseInfo parseInfo = new SemanticParseInfo();
        parseInfo.setQueryMode("PLAIN_TEXT_DDL");
        parseResp.getSelectedParses().add(parseInfo);
        parseResp.setState(ParseResp.ParseState.COMPLETED);

	}

}
